home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_automake.idb / usr / freeware / share / aclocal / lispdir.m4.z / lispdir.m4
Encoding:
Text File  |  1999-07-16  |  1.1 KB  |  38 lines

  1. ## ------------------------
  2. ## Emacs LISP file handling
  3. ## From Ulrich Drepper
  4. ## ------------------------
  5.  
  6. # serial 1
  7.  
  8. AC_DEFUN(AM_PATH_LISPDIR,
  9.  [# If set to t, that means we are running in a shell under Emacs.
  10.   # If you have an Emacs named "t", then use the full path.
  11.   test "$EMACS" = t && EMACS=
  12.   AC_PATH_PROGS(EMACS, emacs xemacs, no)
  13.   if test $EMACS != "no"; then
  14.     AC_MSG_CHECKING([where .elc files should go])
  15.     dnl Set default value
  16.     lispdir="\$(datadir)/emacs/site-lisp"
  17.     emacs_flavor=`echo "$EMACS" | sed -e 's,^.*/,,'`
  18.     if test "x$prefix" = "xNONE"; then
  19.       if test -d $ac_default_prefix/share/$emacs_flavor/site-lisp; then
  20.     lispdir="\$(prefix)/share/$emacs_flavor/site-lisp"
  21.       else
  22.     if test -d $ac_default_prefix/lib/$emacs_flavor/site-lisp; then
  23.       lispdir="\$(prefix)/lib/$emacs_flavor/site-lisp"
  24.     fi
  25.       fi
  26.     else
  27.       if test -d $prefix/share/$emacs_flavor/site-lisp; then
  28.     lispdir="\$(prefix)/share/$emacs_flavor/site-lisp"
  29.       else
  30.     if test -d $prefix/lib/$emacs_flavor/site-lisp; then
  31.       lispdir="\$(prefix)/lib/$emacs_flavor/site-lisp"
  32.     fi
  33.       fi
  34.     fi
  35.     AC_MSG_RESULT($lispdir)
  36.   fi
  37.   AC_SUBST(lispdir)])
  38.